import request from "@/utils/request";

/**
 * 分页查询学校
 * @param param
 * @returns {AxiosPromise}
 */
export function page(param) {
    return request({
        url: '/school/page',
        method: 'get',
        params: param
    })
}

/**
 * 启用学校
 * @param uuid
 * @returns {AxiosPromise}
 */
export function enable(uuid) {
    return request({
        url: '/school/enable/' + uuid,
        method: 'put',
    })
}

/**
 * 禁用学校
 * @param uuid
 * @returns {AxiosPromise}
 */
export function disable(uuid) {
    return request({
        url: '/school/disable/' + uuid,
        method: 'put',
    })
}

/**
 * 删除学校
 * @param uuid
 * @returns {AxiosPromise}
 */
export function deleted(uuid) {
    return request({
        url: '/school/delete/' + uuid,
        method: 'delete'
    })
}

/**
 * 添加学校
 * @param param
 */
export function add(param) {
    return request({
        url: '/school/add',
        method: 'post',
        data: param
    })
}

/**
 * 获取所有学校
 */
export function all() {
    return request({
        url: '/school/all',
        method: 'get'
    })
}
